Gioc: Refactored extend method. Added pre processor support. Remove console calls.