Adding loading spinner, refactoring tests, adding loading spinner test