Changes after feedback and fixing some issues on the back-end code