Simplify code

This should make things more streamlined. I hope.