Refactored minor glitches