Hi kolibrizas, it's been a long time since I answered one of your questions. All I can recommend is building a comprehensive code snippets library. Try to use common includes and functions - even HTML code that you can draw on to assemble your project. I'm sure you do this anyway, but most designers have a vast library of snippets to speed things up.
I use a program called Codebank to keep control of my snippets:
http://www.snapfiles.com/get/codebank.html