started using PhpStorm, powerful tool, messed around with UMl diagram. also modified the previous code to make it module-able