Implemented array printing. Code simplification.