Removed unused code.

In order to simlify the code structure.