Add loading states, general refactor