General Cleanup of code