made typing more error resitant. refactored debug. Added image links. Closes #32.