New model
Some cleaning + command line support