Added methods. Bug fixes