"Thoughts are like seeds, out of which grows the tree of our personality. As are your thoughts, so does the tree grows to be, upright or crooked, pretty or ugly; good or bad attitude and behaviour as its branches"
I have modified this thought a bit to make it more inclusive. This being said, no more need to say as you sow so shall you reap. What you do now determines your tomorrow, just like what you did in the past has shaped your today. Actions grow out of thoughts so make your thoughts pure, pure action shall follow. There is a point I'd like to make here about the three types of realities. But I will write about them later.
Therefore, we can see that in every religion/faith there is a heavy emphasis on purification of your mind. May it be through repentance, surrender, knowledge or purification of actions...goal is the same. Empty mind may be a devil's workshop, but a pure and focused mind is an angels' harp from which only soothing melodies can be created!