Fixed indentions after algorithms
Fixed some reference issues