Add echo and fail methods for testing. Coding style fix.