Bug fixes

# when initialising codebrick property type now does not try to create
an interfaced brick on an undefined property
# individual codebricks are now initialised rather than array from
direct property
# added services property to express server and app state
# now throws exception when typeid is undefined when calling
getDefinition
Error handling

# Added guard method to env
# Refactored fs repo to use guard