Made input handling more consisting

Also:
- Bugfix in handling sub-expression in filter key
- Fixed a bug where variables could not be used as value when defining an object
- Added `keys` function
- Removed run() function since it wasn't used anymore