Tested and fixed some minor glitches