Coin plugin system

Will fix #1953 once merged.