Refactor custom node compilation into single function on FLOOD object