fixes
finished ui and some bug fixes. added some phpdocs to some undocumented functions