Added ability to change legend position, tests. Fixes #33.