This resolves #1 and resolves #2