Re-organising some code
Re-organising some code