Cleaned code (warnings etc)

Fixes #1098 #1099 #1108
whoa, these tests need to be moved to theano, not just deleted. Have they actually been moved to theano? I don't see them there.