Tweaked for errors, removed some NSLogs