Add main
Clean up, text handling