Added hide/show spinner code