A few changes

Just some cleanup. I changed some things that might be bad (converted some classes to enums) which now you have to cast the enums to ints whenever you are making a comparison with ids. The join() function is used in preference to Logging in and joining.

Hope it doesn't break anything else, though.