added some NSLogs to test things. Changed some little things.