Code cleanup and adding files