Resolves #102, fixes #86, resolves #146, resolves #25