Implemented naive register allocation