move main to SMessage::main
add parameters for rake tasks