Deleted unnecessary parts and changed to xavier weight initialization