Generates controller