Added spinner code and separated out custom CSS