Removed the need of server interaction. Cleaned up code.