config file support, some input handling.

Signed-off-by: Miethpo <miethpomail@yahoo.co.uk>