Added Main / Fixed receiveCommands