Fixed #28 and #30
Fixed merge issues from DEV