Many fixes, add setup script.