Solved several issues and added some new features.