Add the _code method
Rewrote _code to make it less horrible