Add improvements #14 and #22