Condensed into one code

Made everything into one code.