some fixed issues UI tablet mode, finished db function for user, optimized code