browser back button works properly + other improvements