Handle Cint and nested pointer types

This also improves error messages and cleans up variable names