Rename pages and functions and changing flow to make it more responsive