removed unused code and cleaned up file