Added random color module
Update main to use color module
Move some functions around plus fix

Functions: nested functions to prevent global namespace pollution.
Fix: Update mode string of already added users.
ignore swap files from vim