Got #1 done, working on #2. Work in progress.