Move parsing logic to class, implement chain commands