If you know all of this and you have been working since 2010 on this project then you must be doing something wrong.
Look at the post #35 by PlausiblyDamp, your only reaction is posting the same code over and over