Code cleanup and classloader work