Pirxify: move instructions to the 'main' function