Made modifyHamParams a free function
Made more stuff constant