Command-line handling overhaul (WIP)

Signed-off-by: Haru <haru@dotalux.com>