LPS-40546

I tried to break this down a little bit more and renamed some stuff so it might seem more organized.