cleaned up code and modified soft keyboard