@thanhle.. I tried posting the three definition arrays but the code was too much text..I tried only the arrays for the vector text but that was also too big for the system.Let me know what you think. Thanks!

You can also post code to a page like http://pastie.org/ and link it from here. Or the best solution - make an account on github or bitbucket, create a code-snippets project there and post you stuff there. That way you can modify it easy, have access to it from anywhere, it's easy to link it and people even can give you patches directly for improvements.