Code cleanup. Pending compiling