Moved initial code over