Move all frontend functions to frontend.[c] and convert proxy

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>