Code Cleanup part 1