Added moar tests. Fixed errors.