Code cleanup and fixed errors