Remove tabs and clean up code