cleaned code, removed unused parts + other small changes