Implemented GUI part.