Optimize resources

Closes gh-13. Closes gh-14. Closes gh-22.