Proper command line parsing, caching, better content math