more code cleanup and bug fixes. added all caps functionality, resolves #10