added getMode() and getType() functions; methodDeclaration should now be generic