Added final touches, now works as a CLI.