Added borders to Text fields and added comments. Also lots of refactoring