Cleaned up code. Removed unneeded classes and adapted phpDoc