final commit for the night, added some fixes