Change some function passing by reference
Split program into modules