Fixing a few issues and created a phing script