Remove unnecessary pieces of code