Cleaned up warnings and documentation