fixed some state issues, cleaned up controllers