Added waits for the methods and fixed semicolons