Manual copy of Rene's latest implementations

Signed-off-by: Nathan T Freeman <nathan.freeman@redpilldevelopment.com>