Part of #38
Part of #38