Remove unnesecary code and debug stuff