Added risk levels, fixed bugs