[owtf] Move main to a function.