Added with macro and changed for/foreach for consistency. Fixed up docs and added/changed tests

Added tests

because of 'with' using function called 'with*', for is changed to maintain a set format'

changed the docs to comply with the change of foreach and for*

Added error handling

Fixed syntax consistency problem with for and with

Fixed tests