back button bug fixed, cleaned js code and minor ui improvements