Cleaned up code

Possible final