Replaced some common operations with methods