Small style changes and added support for 'failed' status