Fix/issue 11

fix #11 

- detect invalid type redeclarations
- remove failed types and vars