Removed all compiling errors, e.g. missing return statements.