Some MySQL Integration, Made the code less derpy.