Cleaning  up code base