fixed stuff and improved main.