added more command line option. It is now possible to limit memory and cpu usage. Also comments have been added to the code.