Cleaned up
Added documentation