Updated package structure

Most of the classes were bulked in a single package making it difficult
to read and debug the code. Thus the code has been split in more
significant packages.