Minimal library based on https://github.com/remy/min.js