Fixes #14 and adds legacy support