removing dead code from functions, adding styling