Added CLI and formatting functionality