Separate command and library