Refactor validsig