Cleaned up useless code and made Python methods work