Simplify handler

Remove unused codes.