Cleaned the code of unuseful parts