Cleaning up code, nearly ready to push Android