lotsa fixes and stuff