changed from external css to embedded style for better inkscape support
separated out some drawing coordinate logic and added border customization