Tidy up code
Remove redundant code