clean-up, code formating. TODO: Documentation