Added return statements to stubs and added some debug statements.