Added invite functionality and commented code