Rewrote stuff for reusable-ness