Code Fixes and get user by id function