Some terrible code... Please fix me.