More WS cleanup courtesy of @Arfrever