cleaned up result initialization and moved main cli into a class wrapper