Changed the file structure for ease of handling from tsd and added sever...

...al utility classes.