Fix bugs, add few comments, move sources into src