Refactor code and implement caching functionality

Closes #4.
Revise image loading

Closes #1.
Release 0.3.0