Added custom mode code, custom inspect code and updated executable method.
Added tests for custom mode method.