Made bartMachine public in order to serialize it
First pass at JSON serialization