added titles to legends, some offset changes, and less hardcoding