initial import after first code review with basic ais functionality

First round code review changes should be in here. Made a new branch and fixed the history.