Rearranging stuff so that it works in this updated format