Bit refactored and added better formatting