Modularized the code, encapsulated bird into a class TODO: add Pipe class