Remove some debuggin messages, changed return value to 1 on sucess, 0 otherwise