cleanup and added prettify