Tabs and spaces, big refactor changes

just spaces
and deleted two unused methods