Fixing a few issues, adding a few features.