added toggling functionality, cleaned up python print statements, fixed python errors