Fixed null pointer and finalized GUI