The OP has said it's in D, so those factors are clearly adding up to that, for him, which is good enough for me. As he wrote the song and decided how and when each phrase resolves, I can't imagine why he would be wrong. In fact I can't see how he even theoretically could be wrong. If he's feeling it in D as he writes it, then it's in D. The only question is what exactly it's doing around D.
But sure, listening to it or seeing a score would resolve the question for those who believe theory is something to be externally imposed upon the compositional process, rather than something to illuminate it from within.
