Cleaneup code

Cleaned up the code