add sprite viewer tool
various bug fixes