Revamp of code