added mobile tweaks and fixed some code