some deletions and cleanup based on Xcode analysis
end is important, put it back
Merge pull request #1000 from birarda/master

some deletions and cleanup