add package to type definition
indent fix
parse switch cases correctly