Small cleanup. Free memory and deal w/ unused parameters