Getting rid of local variables