Adding Usage function, cleaning up, functions POSIX compatible