Screwdriver rewrite

Screwdriver rewrite made by tenplus1.

Pull request for #315