Add start position

Also correct some compilation issues