Remove un-necessary vars and functions