Call functions properly
Remove init function
Put functions into a proper order