removed redundant cast
changed static variable to match current naming conventions
added more documentation and renamed “foreign keys” as “inputKeyPaths”