Cleaned up code
Added testing