fixes syntax, most initial bugs