Some refactor; reformat code; initialize PHPStorm project