Minor bug fixes + working stuff for ios