Fixed root analysis nad made small adjustments to source files