cleaned up code some, tabs to spaces