Based on CMS written in Perl Dancer.