Cleaned up code considerably, tuned UI