Partly corrected code and compiling references