+ added error fixing for mixed type
+ viewing errors
+ moved functions to lib