Update method structure changed
Cleaned up and restructured code