added composer.json and fix phpdocs and cleanup formatting