Fixed issues with mising output, rewrote json output methods