a whole lot of changes
ambient xp gain, better error checking