Added option to generate relative paths
Fixed some parsing for added flexibility